bitkeeper revision 1.1108.40.1 (41092cdfpganwDsmLTIjObLf_WiAXA)
authorgm281@boulderdash.cl.cam.ac.uk <gm281@boulderdash.cl.cam.ac.uk>
Thu, 29 Jul 2004 16:59:11 +0000 (16:59 +0000)
committergm281@boulderdash.cl.cam.ac.uk <gm281@boulderdash.cl.cam.ac.uk>
Thu, 29 Jul 2004 16:59:11 +0000 (16:59 +0000)
CPU migration flag added

xen/common/dom0_ops.c
xen/common/schedule.c
xen/include/xen/sched.h

index 8886878b07b8892f392c1c091d1fae3684f6bb87..0a4086ef6e06de8206bbfde9a8d70208076a290e 100644 (file)
@@ -248,6 +248,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
         else
         {
             domain_pause(d);
+            if(d->processor != cpu % smp_num_cpus)
+                set_bit(DF_MIGRATED, &d->flags);
             set_bit(DF_CPUPINNED, &d->flags);
             d->processor = cpu % smp_num_cpus;
             domain_unpause(d);
index 7b12f8f5ab7aadf3bdbc9a0e2eb30fc97d34b3fc..cc195b31bd10788f5a81e6844fd6c14b42a8a685 100644 (file)
@@ -193,7 +193,9 @@ void domain_wake(struct domain *d)
         d->wokenup = NOW();
 #endif
     }
-
+    
+    clear_bit(DF_MIGRATED, &d->flags);
+    
     spin_unlock_irqrestore(&d->state_lock, flags);
 }
 
index 7f67e9ee48e09775d31a8f0480760a4fa27a3029..0dfa5b0606fd515a3a13daceec1397038acfc753 100644 (file)
@@ -246,6 +246,7 @@ extern struct domain *task_list;
 #define DF_DYING       11 /* Death rattle.                                  */
 #define DF_RUNNING     12 /* Currently running on a CPU.                    */
 #define DF_CPUPINNED   13 /* Disables auto-migration.                       */
+#define DF_MIGRATED    14 /* Domain migrated between CPUs.                  */ 
 
 static inline int domain_runnable(struct domain *d)
 {